import service from '../request.js'

export const login = data=>{
	return service({
		url: '/user/login',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const user_page = data=>{
	return service({
		url: '/user/page',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const user_update = data=>{
	return service({
		url: '/user/update',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const user_add = data=>{
	return service({
		url: '/user/add',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const user_delete = data=>{
	return service({
		url: '/user/delete/'+data,
		method: 'delete'
	})
}